package com.xiaomi.service.impl;

import com.xiaomi.entity.Lunbotu;
import com.xiaomi.mapper.LunbotuMapper;
import com.xiaomi.service.LunbotuService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

/**
 * @ClassName LunbotuServiceImpl
 * @Description TODO
 * @Author zcy
 * @Date 2021/11/28 23:03
 * @Version 1.0
 **/
@Service
public class LunbotuServiceImpl implements LunbotuService {
    @Autowired
    private LunbotuMapper lunbotuMapper;
    @Override
    public List<Lunbotu> pageSearch(Integer startRow, Integer limit, Integer lbtId) {
        return lunbotuMapper.pageSearch(startRow, limit, lbtId);
    }

    @Override
    public Integer getCount(Integer lbtId) {
        return lunbotuMapper.getCount(lbtId);
    }

    @Override
    @Transactional
    public void insert(Lunbotu lunbotu) {
        lunbotuMapper.insert(lunbotu);

    }

    @Override
    @Transactional
    public void update(Lunbotu lunbotu) {
        lunbotuMapper.update(lunbotu);
    }

    @Override
    public void delete(Integer lbtId) {
        lunbotuMapper.delete(lbtId);
    }

    @Override
    public Integer sjupdate(Lunbotu lunbotu) {
     lunbotuMapper.sjupdate(lunbotu);
        return null;
    }
}
